package api.dialogs;

import java.awt.EventQueue;

import javax.swing.JDialog;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import java.awt.FlowLayout;

public class OpenDialog extends JDialog {
	private static final long serialVersionUID = 1L;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					OpenDialog dialog = new OpenDialog();
					dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
					dialog.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the dialog.
	 */
	public OpenDialog() {
		setTitle("Abrir Archivo...");
		setModal(true);
		setBounds(100, 100, 450, 300);
		
		JPanel contentPanel = new JPanel();
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		
		JPanel buttonPanel = new JPanel();
		FlowLayout flowLayout = (FlowLayout) buttonPanel.getLayout();
		flowLayout.setAlignment(FlowLayout.TRAILING);
		buttonPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(buttonPanel, BorderLayout.SOUTH);
		
		JButton btnCancelar = new JButton("Cancelar");
		buttonPanel.add(btnCancelar);
		
		JButton btnAbrir = new JButton("Abrir");
		buttonPanel.add(btnAbrir);

	}

}
